<?php
/*
Copyright 2008, Nathalia


Author:
Nathalia Sautchuk Patrício          (nathalia.sautchuk@gmail.com)

*/
class Renderer extends TRepeaterItemRenderer
{
    public function deleteUsuario($sender,$param)
    {    
        // deletes the user record with the specified username primary key
        try
        {
            UserRecord::finder()->deleteByUsuarioID($param->CommandParameter);
        }
        catch (TDbException $ex)
        {
            throw new THttpException(500,'This user cannot be deleted.');
        }

        $this->Response->redirect("./index.php?page=Usuarios.Listar");

    }
}

?>
